#ifndef MUDNMUCKCELL
#define MUDNMUCKCELL

#include "gameobject.h"

/**
*    All objects in game are contained within a Cell, a Cell has a position, called it's Loc
*    All Cells are adjacent to 8 other Cells those Cells are contained in the Adj array of Cells
*    If a Cell is in a corner then the Cell in the Adj for that corner is itself
*    Adj[0] = NW, Adj[1] = N, Adj[2] = NE
*    Adj[3] = W,  Adj[4] = C, Adj[5] = E
*    Adj[6] = SW, Adj[7] = S, Adj[8] = SE
*
*/
class Cell  : public GameObject{
	private:
		pos Loc;
		bool solid;
		Cell* Adj[8];
    public:
		Cell(int x =0, int y=0, int z=0, bool issolid = false)
		{
			Loc.x = x;
			Loc.y = y;
			Loc.z = z;
			solid = issolid;
			for(int i = 0; i < 8; i++)
					Adj[i] = this;
		}
         std::vector<GameObject* > Contents;

          void setAdj(Cell* otherCell, int i);
          Cell* getAdj(int i);
          bool isSolid();

          bool isAdj(Cell* otherCell);

          std::string view();
          
          int getX();
          int getY();
          pos getLoc();

          bool isCloser(Cell* toCell, Cell* thanCell);

};
#endif

